<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>北京联合大学</title>
</head>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- <link rel="stylesheet" href="https://at.alicdn.com/t/font_835526_xufba1hg66.css"> -->
<link rel="stylesheet" href="https://at.alicdn.com/t/font_835526_uzbxo9d25is.css">
<link rel="stylesheet" href="../../css/Initialization.css">
<link rel="stylesheet" href="../../css/commen.css">
<link rel="stylesheet" href="../../css/evaluate.css">
<body>
<div id="content">
    <div class="initer">
            <!-- 具体内容 -->
            <div class="bread">
                <div class="plain" th:text="${menu.menuname}">成立公司</div>
                <div class="plain">
                    <i class="iconfont icon-right"></i>
                </div>
                <div class="plain current">
                    团队贡献评价
                </div>

                <div class="center-button" style="margin-right: 130px;width: 120px;" th:onclick="'javascript:goEvaluate(\''+${menu.id}+'\',\''+${smenu.id}+'\',\''+${gradeid}+'\')'">
                    团队贡献评分说明管理
                </div>
                <div class="center-button" th:onclick="'javascript:downEvaluate(\''+${menu.id}+'\',\''+${smenu.id}+'\',\''+${gradeid}+'\')'">
                    团队贡献评分导出
                </div>
            </div>
            <div class="teacherlookwork teacherlookteam">
                <table class="table">
                    <tr class="tabletitle">
                        <td>序号</td>
                        <td>组名</td>
                        <td>姓名</td>
                        <td>小组互评平均分</td>
                        <td>老师评分</td>
                        <td>总分</td>
                    </tr>

                    <tr th:each="item : ${arraylist}">
                        <td th:text="${item.id}">1</td>
                        <td th:text="${item.groupname}">A组</td>
                        <td th:text="${item.name}">张三</td>
                        <td th:text="${item.score + '('+item.scoreStr+')'}"></td>
                        <td><div class="file"><input type="text" th:value="${item.teacherScore}" th:onchange="'javascript:updateScore(\''+${item.id}+'\',this.value,\''+${smenu.id}+'\')'" ></div></td>
                        <td><div class="file"><span class="min-button" th:text="${item.score}">9.6</span></div></td>
                    </tr>
                </table>
                <!-- 分页 -->
                <div class="pages" th:utext="${pageResult.getPageHtml()}"></div>
            </div>
        </div>
</div>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/commen.js"></script>
<script>
    function goEvaluate(mid,sid,gradeid) {
        location.href = "../content/evaluate?mid="+mid+"&sid="+sid+"&gradeid="+gradeid;
    }
    function updateScore(id,score,sid) {
        $.ajax({
            type : "POST",
            url : "updateTeacherScore",
            data : {id: id, score: score,sid: sid},
            dataType : "json",
            success : function(json) {
                alert(json.result);
                if(json.state == success){
                    location.reload();
                }
            },
            error:function(msg){
                alert("程序出错，请联系管理员");
            }
        });
    }

    function downEvaluate(mid,sid,gradeid) {
        location.href = "exportScoreExcel?mid="+mid+"&sid="+sid+"&gradeid="+gradeid;
    }
</script>
</body>
</html>

